package cn.seecoder.ai.enums;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;

/**
 * @author fanyanpeng
 * @date 2023/4/6 2:54
 */
@Getter //要转换成json，必须系统获取字段的方法。
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum LearningTypeEnum {
    SUPERVISED_LEARNING(
            "SUPERVISED_LEARNING",
            "监督学习",
            "利用一组已知类别的样本调整分类器的参数，使其达到所要求性能的过程，也称为监督训练或有教师学习。",
            new MachineLearningAlgorithmTypeEnum[]{
                    MachineLearningAlgorithmTypeEnum.CLASSIFICATION,
                    MachineLearningAlgorithmTypeEnum.REGRESSION
            }
    ),

    UNSUPERVISED_LEARNING(
            "UNSUPERVISED_LEARNING",
            "无监督学习",
            "根据类别未知(没有被标记)的训练样本解决模式识别中的各种问题，称之为无监督学习。",
            new MachineLearningAlgorithmTypeEnum[]{
                    MachineLearningAlgorithmTypeEnum.CLUSTERING
            })
    ;


    // 该枚举型本身的String，通过对self的引用，前端可以将选中的枚举型返回到后端！
    private final String self;
    private final String learningTypeName;

    //    private final String learningType;
    private final String description;
    private final MachineLearningAlgorithmTypeEnum[] machineLearningAlgorithmTypeEnum;


    LearningTypeEnum(String self, String learningTypeName, String description, MachineLearningAlgorithmTypeEnum[] machineLearningAlgorithmTypeEnum) {
        this.self = self;
        this.learningTypeName = learningTypeName;
        this.description = description;
        this.machineLearningAlgorithmTypeEnum = machineLearningAlgorithmTypeEnum;
    }
}
